package com.personal.system.mapper.sys;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.personal.model.system.SysUser;
import com.personal.model.vo.SysUserQueryVo;
import com.personal.system.ann.DataColumn;
import com.personal.system.ann.DataScope;
import com.personal.system.entity.vo.UserInfoVO;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author personal
 * @since 2022-09-28
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    @DataScope({
            @DataColumn(key = "deptName", value = "dept_id")
            ,@DataColumn(key = "userName", value = "creator")
    })
    IPage<SysUser> selectPage(Page<SysUser> pageParam, @Param("vo") SysUserQueryVo sysUserQueryVo);

    UserInfoVO selectInfoByUserId(Object userId);
}
